<script type="text/javascript">
ws = new WebSocket("ws://"+document.domain+":2346"); //WebSocket("ws://"+document.domain+":7272");
ws.onopen = function() {
	alert("连接成功");
	  ws.send('tom');
	alert("给服务端发送一个字符串：tom");
	};
	ws.onmessage = function(e) {
	  alert("收到服务端的消息：" + e.data);
	};
</script>
<style>
*{
 	margin:0;
 	padding:0;
}
.meta{
	width:500px;
	height:800px;
	border-radius: 5%;
	border:3px solid #000;
	margin:10px auto;
	position:relative;
}
.login_info{
	width:100%;
	height:40px;
	border-bottom:3px solid #000;
	position:absolute;
	left:0;
	top:0;
	line-height:40px;
	text-align:center;
	display:none;
}
</style>
<div class="meta">
	<div class="login_info">

	</div>
</div>